﻿<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<!--<link rel="Bookmark" href="imgs/favicon.ico"/>-->
	<!--<link rel="Shortcut Icon" href="imgs/favicon.ico"/>-->
	<!--<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css"/>-->
	<!--<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css"/>-->
	<!--<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>-->
	<!--<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin"/>-->
	<!--<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css"/>-->
	<title>错误日志</title>
</head>
<body>
<h4>后台框架错误日志</h4>
<div id="body"></div>
</body>
</html>


<script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/admin/js/config.js"></script>
<script type="text/javascript">
	(function () {
		getLogIndex();
	})();
	//文件列表
	function getLogIndex(){
		$.ajax({
			type: 'post',
			url: apiDomain + '/logs/index',
			data: {},
			success:function(res){
				console.log(res);
				if (res.code < 0) {
					console.log(res); return
				}
				var d = res.data;
				var h = '';
				for (var i=0;i<d.length;i++) {
					h += '<p>';
					h += '<a href="javascript:;">'+d[i].filename+'</a>';
					h += ' &nbsp; 大小：'+d[i].size;
					h += ' &nbsp; <a href="'+d[i].pathname+'">点击下载</a>';
					h += '</p>';
				}
				$('#body').html(h);
			},
			error:function(){
				console.log('请求失败')
			}
		});
	}
</script>